package com.qiangqiang.resoldhouse.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.qiangqiang.resoldhouse.entity.HouseResource;
import com.qiangqiang.resoldhouse.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author : sky
 * @date : 2018/8/13
 * @description :
 */
@Mapper
public interface UserMapper extends BaseMapper<User>{

    @Select("select * from user where user_id = #{userId}")
    public User selectUserById(@RequestParam("userId") Long userId);

    @Update("update user set user_name=#{userName},sex=#{sex},telephone=#{telephone}," +
            "email=#{email},create_time=#{createTime},account=#{account},update_time=#{updateTime} " +
            "where user_id=#{userId}")
    public Integer updateUserById(@RequestParam("user") User user);
}
